#include <iostream>

using namespace std;

int temp = 3;
int values = 0;


int replace_arr(int arr[], int capacity);
int follow_up_function(int arr[], int capacity);
int output_function(int arr[], int capacity);

int main(int argc, char const *argv[])
{
    int arr[10] = {1, 2, 3, 3, 5, 6, 7, 8, 8, 10};

    replace_arr(arr,10);
    follow_up_function(arr, 10);
    output_function(arr,10);
    
    return 0;
}

int replace_arr(int arr[], int capacity)
{
     for(int i = 0; i < capacity ; i++)
    {
         if(arr[i] != temp)
            {
                arr[values ++] = arr[i];
            }
   }
    return 0;

}

int follow_up_function(int arr[], int capacity)
{
    for(int i = values; i < capacity; i++)
    {
        arr[i] = 0;
    }
    return 0;
}

int output_function(int arr[], int capacity)
{
    for(int i = 0; i < capacity; i++)
    {
        cout << arr[i] << "  ";
    }   
   
}
